﻿using MXComponent.Common.Utility;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace MXComponent
{
    /// <summary>
    /// App.xaml 的交互逻辑
    /// </summary>
    public partial class App : Application
    {
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            string _intPath = AppDomain.CurrentDomain.BaseDirectory + "Setting.ini";
            IniHelp inifile = new IniHelp(_intPath);
            string softLicence = inifile.IniReadValue("Setting", "SoftLicence");
            SoftRegister sregister = new SoftRegister();

            if (softLicence != sregister.GetRNum())
            {
                SoftRegWindow sr = new SoftRegWindow();
                sr.ShowDialog();
            }
            else
            {
                LoginWindow lw = new LoginWindow();
                lw.ShowDialog();
            }
        }
    }
}